// 树的查找
export function treeFind(list, callback) {
  for (let i = 0; i < list.length; i++) {
    let node = list[i];
    if (callback(node, i)) {
      return node;
    }
    if (node.children) {
      let result = treeFind(node.children, callback);
      if (result) {
        return result;
      }
    }
  }
}
